﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class IconItem : UIDragDropItem
{
    public Camera camera2D;

    private void Awake()
    {
        camera2D = GameObject.Find("Camera").GetComponent<Camera>();
    }
  


    protected override void OnDragDropMove(Vector2 delta)
    {
        base.OnDragDropMove(delta);
        Debug.Log(1111111);
        Ray ray = camera2D.ScreenPointToRay(Input.mousePosition);
        RaycastHit[] raycastHits = Physics.RaycastAll(ray, 1000);
        for (int i = 0; i < raycastHits.Length; i++)
        {
            Debug.Log(raycastHits[i].collider.gameObject.name);
           // if (raycastHits[i].collider.gameObject.name=="Icon"&&)
           // {
           //
           // }
        }
      


    }
    protected override void OnDragDropEnd()
    {
        base.OnDragDropEnd();
    }



}
